<?php
/**
  *@function 得到所有的分类信息
  *
  *@date 2013-05-29 20:17
  *
  */
class M_activity extends CI_Model {
	
	private $table_name = "zy_activity";

    function __construct()
    {
        parent::__construct();
		$this->load->database();
    }
    
    /**
     * 将供应商插入的品牌数据库
     * 
     * @param string $name 供应商名称
     * @param string $address 供应商地址
     * @param string $mobile 供应商的联系方式
     * 
     * @return int insert_id 品牌的ID
     */
    public function selectActivity($type)
    {
    	$query = "SELECT * FROM `zy_books` as b,`{$this->table_name}` as a WHERE a.`pro_id`=b.`book_id` AND a.`ban_id`='{$type}'";
    	return $this->db->query( $query )->result();
    }

}